/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.service.impl;

import com.techshop.dao.ManufacturerDao;
import com.techshop.model.Manufacturer;
import com.techshop.service.ManufacturerService;
import java.util.List;

/**
 *
 * @author Hai-PC
 */
public class ManufacturerServiceImpl implements ManufacturerService
{    
    private ManufacturerDao manufacturerDao;
    
    @Override
    public List<Manufacturer> findAll()
    {
        System.out.println("ManufacturerServiceImpl.findAll");
        //return null;
        return this.getManufacturerDao().findAll();
    }

    @Override
    public Manufacturer getById(int manufacturerID)
    {
        return this.getManufacturerDao().getById(manufacturerID);
    }

    @Override
    public boolean insert(Manufacturer manufacturer)
    {
        return this.getManufacturerDao().insert(manufacturer);
    }

    @Override
    public boolean update(Manufacturer manufacturer)
    {
        return this.getManufacturerDao().update(manufacturer);
    }

    @Override
    public boolean delete(Manufacturer manufacturer)
    {
        return this.getManufacturerDao().delete(manufacturer);
    }

    /**
     * @return the manufacturerDao
     */
    public ManufacturerDao getManufacturerDao()
    {
        return manufacturerDao;
    }

    /**
     * @param manufacturerDao the manufacturerDao to set
     */
    public void setManufacturerDao(ManufacturerDao manufacturerDao)
    {
        this.manufacturerDao = manufacturerDao;
    }
}